<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateReservationsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('reservations', function (Blueprint $table) {
            $table->id();
            $table->integer('room_id')->comment('房源id');
            $table->integer('user_id')->comment('用户id');
            $table->integer('broker_id')->comment('经纪人id');
            $table->string('phone')->comment('手机号');
            $table->string('reserve_umber')->comment('预约编号');
            $table->string('reserve_address')->comment('预约地址');
            $table->string('reserve_time')->comment('预约时间');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('reservations');
    }
}
